package com.example.topicservice.service;

import com.example.commonapi.pojo.UAT;
import com.example.commonapi.pojo.Topic;
import com.example.commonapi.pojo.User;

import java.util.List;

public interface TopicService {
    List<UAT> search(String word);

    Integer addTopicT(Topic topic);

    int deleteTopic(Topic topic);

    Integer deleteTopicById(int id);

    Topic getTopicById( int id);

    List<Topic> totalTopic();

    List<Topic> getTopicByUserId(Integer userId);

    /**
     * 获取 user_and_topic 视图的所有数据
     * @return
     */
    List<UAT> getAllUAT();

    /**
     * 根据 topicId 获取 user
     * @param topicId
     * @return
     */
    User getUserByTopicId(Integer topicId);

    /**
     * 更新
     * @param topic
     */
    void topicUpdate(Topic topic);

    void deleteTopicByUserId(Integer userId);

    List<UAT> getUATByUserId(Integer userId);
}
